using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DownLoadPackageResponse : GeneratedMessageLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>
		{
			private bool resultIsReadOnly;
			private DownLoadPackageResponse result;
			protected override DownLoadPackageResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DownLoadPackageResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DownLoadPackageResponse DefaultInstanceForType
			{
				get
				{
					return DownLoadPackageResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public SKBuiltinBuffer_t PackageBuf
			{
				get
				{
					return this.result.PackageBuf;
				}
				set
				{
					this.SetPackageBuf(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public uint TotalSize
			{
				get
				{
					return this.result.TotalSize;
				}
				set
				{
					this.SetTotalSize(value);
				}
			}
			public Builder()
			{
				this.result = DownLoadPackageResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DownLoadPackageResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DownLoadPackageResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DownLoadPackageResponse other = this.result;
					this.result = new DownLoadPackageResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DownLoadPackageResponse.Builder Clear()
			{
				this.result = DownLoadPackageResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DownLoadPackageResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DownLoadPackageResponse.Builder(this.result);
				}
				return new DownLoadPackageResponse.Builder().MergeFrom(this.result);
			}
			public override DownLoadPackageResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DownLoadPackageResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is DownLoadPackageResponse)
				{
					return this.MergeFrom((DownLoadPackageResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DownLoadPackageResponse.Builder MergeFrom(DownLoadPackageResponse other)
			{
				return this;
			}
			public override DownLoadPackageResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DownLoadPackageResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DownLoadPackageResponse._downLoadPackageResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DownLoadPackageResponse._downLoadPackageResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasPackageBuf)
							{
								builder2.MergeFrom(this.PackageBuf);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.PackageBuf = builder2.BuildPartial();
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasType = input.ReadUInt32(ref this.result.type_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasTotalSize = input.ReadUInt32(ref this.result.totalSize_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DownLoadPackageResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public DownLoadPackageResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public DownLoadPackageResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public DownLoadPackageResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public DownLoadPackageResponse.Builder SetPackageBuf(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPackageBuf = true;
				this.result.packageBuf_ = value;
				return this;
			}
			public DownLoadPackageResponse.Builder SetPackageBuf(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasPackageBuf = true;
				this.result.packageBuf_ = builderForValue.Build();
				return this;
			}
			public DownLoadPackageResponse.Builder MergePackageBuf(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasPackageBuf && this.result.packageBuf_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.packageBuf_ = SKBuiltinBuffer_t.CreateBuilder(this.result.packageBuf_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.packageBuf_ = value;
				}
				this.result.hasPackageBuf = true;
				return this;
			}
			public DownLoadPackageResponse.Builder ClearPackageBuf()
			{
				this.PrepareBuilder();
				this.result.hasPackageBuf = false;
				this.result.packageBuf_ = null;
				return this;
			}
			public DownLoadPackageResponse.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public DownLoadPackageResponse.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
			public DownLoadPackageResponse.Builder SetTotalSize(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalSize = true;
				this.result.totalSize_ = value;
				return this;
			}
			public DownLoadPackageResponse.Builder ClearTotalSize()
			{
				this.PrepareBuilder();
				this.result.hasTotalSize = false;
				this.result.totalSize_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int PackageBufFieldNumber = 2;
		public const int TypeFieldNumber = 3;
		public const int TotalSizeFieldNumber = 4;
		private static readonly DownLoadPackageResponse defaultInstance;
		private static readonly string[] _downLoadPackageResponseFieldNames;
		private static readonly uint[] _downLoadPackageResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasPackageBuf;
		private SKBuiltinBuffer_t packageBuf_;
		private bool hasType;
		private uint type_;
		private bool hasTotalSize;
		private uint totalSize_;
		private int memoizedSerializedSize = -1;
		public static DownLoadPackageResponse DefaultInstance
		{
			get
			{
				return DownLoadPackageResponse.defaultInstance;
			}
		}
		public override DownLoadPackageResponse DefaultInstanceForType
		{
			get
			{
				return DownLoadPackageResponse.DefaultInstance;
			}
		}
		protected override DownLoadPackageResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public SKBuiltinBuffer_t PackageBuf
		{
			get
			{
				return this.packageBuf_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public uint TotalSize
		{
			get
			{
				return this.totalSize_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasPackageBuf && this.BaseResponse.IsInitialized && this.PackageBuf.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasPackageBuf)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.PackageBuf);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Type);
				}
				if (this.hasTotalSize)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.TotalSize);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DownLoadPackageResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] downLoadPackageResponseFieldNames = DownLoadPackageResponse._downLoadPackageResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, downLoadPackageResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasPackageBuf)
			{
				output.WriteMessage(2, downLoadPackageResponseFieldNames[1], this.PackageBuf);
			}
			if (this.hasType)
			{
				output.WriteUInt32(3, downLoadPackageResponseFieldNames[3], this.Type);
			}
			if (this.hasTotalSize)
			{
				output.WriteUInt32(4, downLoadPackageResponseFieldNames[2], this.TotalSize);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasPackageBuf)
			{
				num ^= this.packageBuf_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			if (this.hasTotalSize)
			{
				num ^= this.totalSize_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			DownLoadPackageResponse downLoadPackageResponse = object_0 as DownLoadPackageResponse;
			return downLoadPackageResponse != null && (this.hasBaseResponse == downLoadPackageResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(downLoadPackageResponse.baseResponse_))) && (this.hasPackageBuf == downLoadPackageResponse.hasPackageBuf && (!this.hasPackageBuf || this.packageBuf_.Equals(downLoadPackageResponse.packageBuf_))) && (this.hasType == downLoadPackageResponse.hasType && (!this.hasType || this.type_.Equals(downLoadPackageResponse.type_))) && (this.hasTotalSize == downLoadPackageResponse.hasTotalSize && (!this.hasTotalSize || this.totalSize_.Equals(downLoadPackageResponse.totalSize_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>.PrintField("PackageBuf", this.hasPackageBuf, this.packageBuf_, writer);
			GeneratedMessageLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>.PrintField("Type", this.hasType, this.type_, writer);
			GeneratedMessageLite<DownLoadPackageResponse, DownLoadPackageResponse.Builder>.PrintField("TotalSize", this.hasTotalSize, this.totalSize_, writer);
		}
		public static DownLoadPackageResponse ParseFrom(byte[] data)
		{
			return DownLoadPackageResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DownLoadPackageResponse MakeReadOnly()
		{
			return this;
		}
		public static DownLoadPackageResponse.Builder CreateBuilder()
		{
			return new DownLoadPackageResponse.Builder();
		}
		public override DownLoadPackageResponse.Builder ToBuilder()
		{
			return DownLoadPackageResponse.CreateBuilder(this);
		}
		public override DownLoadPackageResponse.Builder CreateBuilderForType()
		{
			return new DownLoadPackageResponse.Builder();
		}
		public static DownLoadPackageResponse.Builder CreateBuilder(DownLoadPackageResponse prototype)
		{
			return new DownLoadPackageResponse.Builder(prototype);
		}
		static DownLoadPackageResponse()
		{
			DownLoadPackageResponse.defaultInstance = new DownLoadPackageResponse().MakeReadOnly();
			DownLoadPackageResponse._downLoadPackageResponseFieldNames = new string[]
			{
				"BaseResponse",
				"PackageBuf",
				"TotalSize",
				"Type"
			};
			DownLoadPackageResponse._downLoadPackageResponseFieldTags = new uint[]
			{
				10u,
				18u,
				32u,
				24u
			};
			object.ReferenceEquals(micromsg.Proto.DownLoadPackageResponse.Descriptor, null);
		}
	}
}
